package cn.tlb.gl.game.model;

import android.graphics.PixelFormat;
import android.os.Bundle;
import android.view.MotionEvent;

import cn.tlb.BaseGLActivity;

public class GameModelActivity extends BaseGLActivity {
    private ModelRenderer renderer;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        renderer = new ModelRenderer(this);
        mGlSurfaceView.setEGLConfigChooser(8, 8, 8, 8, 16, 0);
        mGlSurfaceView.setRenderer(renderer);
        mGlSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
        setContentView(mGlSurfaceView);
    }

    @Override
    public boolean onTouchEvent(MotionEvent e) {
        super.onTouchEvent(e);
        renderer.setAngleX(mAngleX);
        renderer.setAngleY(mAngleY);
        return true;
    }
}
